<?php
session_start();
include("conex.php");
include("fechas.php");
import_request_variables("g,P");
header("Content-Type: text/html; charset=iso-8859-1");


echo "<table width='750' border='0' align='center' cellpadding='0' cellspacing='0' class='datos cuadro2'>
  <tr bgcolor='#f3f3f3'>
  <td width='179'>Nombre Completo</td>
  <td width='125'>Sexo</td>
   <td width='121'>Entidad</td>
  <td width='157'>Municipio</td>
   <td width='81'>Eliminar</td>
  </tr>";
?>

  <tr>
   <td><?php
   $qry = "select * from aux_familiares WHERE id_principal = $paciente";
$row= mysql_query($qry,$link);
while($filas = mysql_fetch_array($row))
{

echo $filas[2]." ".$filas[3]." ".$filas[4]." ";
   
   
   ?></td>
   <td><?php 
   if($filas[6] == 1)
   {
   echo "MASCULINO";
   }
   else
   {
     echo "FEMENINO";
   }
    ?></td>
  <td>  
  <?php 
  $sqle = "select * from catalogos.entidades_inegi where id_entidad = $filas[5]";
  $rowe=mysql_query($sqle,$link);
  while($filase = mysql_fetch_array($rowe))
  {
  echo $filase['cNentidad'];
  }
  ?></td>
  <td>
  <?php
    $sqlm = "select * from catalogos.municipios_inegi where id_municipio = $filas[8] and id_entidad = $filas[5]";
  $rowm=mysql_query($sqlm,$link);
  while($filasm = mysql_fetch_array($rowm))
  {
  echo $filasm['cNmunicipio'];
  }
  ?></td><td>
<a href="#" onclick="elimcont4(<?php echo $filas[0]; ?>,<?php echo $paciente; ?>)"><img src="images/b_drop.png" alt="Eliminar" width="16" height="16" border="0" /></a></td>
  </tr>
  <tr>
   <td><?php }?></td>
  <td></td>
  <td></td>
  <td></td>
  <td></td>
  <td></td>
  </tr>
  </table>
